﻿@using WebSimplicity.Data;
@model WebSimplicity.Data.ContentPage
@{
    ViewBag.Title = "Create";
    ViewBag.PagesState = "active";
}
<script src="@Url.Content("~/content/js/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/content/js/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@{using (Html.BeginForm("create", "pages", new { section = "content" }, FormMethod.Post, new { @id = "newpageform", @class = "form" }))
  {		
    @Html.ValidationSummary(true)
    <div class="grid_9">
        <div class="block">
            <h3>
                <span>Page Content</span></h3>
            <div class="bcontent">
                <p>
                    @Html.EditorFor(model => model.Title)
                </p>
                <p>
                    @Html.LabelFor(model => model.PageContent)
                    @Html.TextAreaFor(model => model.PageContent, new { @class = "textarea content full" })
                </p>
            </div>
        </div>
        <div class="block collapsible">
            <h3>
                <span>Search Engine Properties</span></h3>
            <div class="bcontent">
                <p>
                    @Html.EditorFor(model => model.Keywords)
                </p>
                <p>
                    @Html.LabelFor(model => model.Description)
                    @Html.TextAreaFor(model => model.Description, new { @class = "textarea full" })
                    @Html.ValidationMessageFor(model => model.Description)
                </p>
            </div>
        </div>
    </div>
    <div class="grid_3">
        <div class="block collapsible">
            <h3>
                <span>Page Settings</span></h3>
            <div class="bcontent">
            <p>
                    @Html.EditorFor(model => model.MenuTitle)
                </p>
                <p>
                    @Html.EditorFor(model => model.Slug)
                </p>
                <p>
                    @Html.EditorFor(model => model.SortOrder)
                </p><p>
                    @Html.EditorFor(model => model.ParentId)
                </p><p>
                    @Html.LabelFor(model => model.Template)
                        @Html.DropDownListFor(i => i.Template, Themes.GetTemplates(), new { @class = "select full96" })
                    @Html.ValidationMessageFor(model => model.Template)
                </p><p>
                    @Html.EditorFor(model => model.Published)
                    </p><p>
                    @Html.EditorFor(model => model.PublishDate)</p>
            </div>
        </div>
    </div>
  }
}
@section breadcrumbs{
    <ul>
        <li>@Html.ActionLink("pages","index", "pages")</li>
        <li>Create</li>
    </ul>
    <a class="button submit css_right"><span><span>
        <img src="@Url.Content("~/content/icons/disk-black.png")" width="16" height="16">
        Save</span></span></a>
        <a href="/pages" class="button css_right red"><span><span>
        <img src="@Url.Content("~/content/icons/navigation-180-white.png")" width="16" height="16">
        Cancel</span></span></a>
}
@section scripts{
    <script src="@Url.Content("~/content/modules/ckeditor/ckeditor.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/content/modules/ckeditor/adapters/jquery.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/content/js/functions.js")" type="text/javascript"></script>
}
